package main;

import org.eclipse.swt.graphics.Image;


import rooms.*;
import staticalObjects.*;
import graphicalInterface.HomeInterface;
import homeAppliances.Computer;
import homeAppliances.Fridge;
import homeAppliances.Tap;
import homeAppliances.TV;
import homeAppliances.WC;
import homeAppliances.AirConditioning;
import homeAppliances.Stove;
import homeAppliances.ElectricLamp;
import homeAppliances.WashingMachine;

/**
 * modelul casei
 *
 */
public class Home {

	private Living living;
	private Bathroom baie1;
	private Bathroom baie2;
	private Kitchen bucatarie;
	private Bedroom dormitor1;
	private Bedroom dormitor2;
	private Bedroom dormitor3;
	private EntranceHall hol;
	
	public ElectricLamp becBuc;
	public ElectricLamp becB2;
	public ElectricLamp becL;
	public ElectricLamp becB1;
	public ElectricLamp BecD1;
	public ElectricLamp BecD2;
	public ElectricLamp BecD3;
	public ElectricLamp BecH;
	public Fridge frigi;
	public Stove aragaz;
	public Tap robinetBuc;
	public WashingMachine masina;
	public Tap robinetB2;
	public Tap robinetBaie1;
	public Bathtub cadaBaie1;
	public TV tv;
	public Computer calcL;
	public AirConditioning aer;
	public WC wc1;
	public WC wc2;
	public Tap robinetVana;
	public Sofa canap;
	public Table masaScaune;
	public DoubleBed patD;
	public Bed patS1,patS2;
	public Plant plant;
	
	public Home()
	{
		createCasa();
	}
	
	public void createCasa()
	{
		living=new Living();
		baie1=new Bathroom();
		baie2=new Bathroom();
		bucatarie=new Kitchen();
		dormitor1=new Bedroom();
		dormitor2=new Bedroom();
		dormitor3=new Bedroom();
		hol= new EntranceHall();
		
		//becuri
		becBuc = new ElectricLamp();
		becBuc.setX(20);
		becBuc.setY(150);
		becBuc.setStare(false);
		
		becB2 = new ElectricLamp();
		becB2.setX(20);
		becB2.setY(400);
		becB2.setStare(false);
		
		becL = new ElectricLamp();
		becL.setX(200);
		becL.setY(730);
		becL.setStare(false);
		
		becB1 = new ElectricLamp();
		becB1.setX(530);
		becB1.setY(730);
		becB1.setStare(false);
		
		BecD1 = new ElectricLamp();
		BecD1.setX(800);
		BecD1.setY(730);
		BecD1.setStare(false);
		
		BecD2 = new ElectricLamp();
		BecD2.setX(940);
		BecD2.setY(400);
		BecD2.setStare(false);
		
		BecD3 = new ElectricLamp();
		BecD3.setX(940);
		BecD3.setY(150);
		BecD3.setStare(false);
		
		BecH = new ElectricLamp();
		BecH.setX(420);
		BecH.setY(400);
		BecH.setStare(false);
		
		//buc
		frigi= new Fridge();
		frigi.setX(50);
		frigi.setY(20);
		frigi.setStare(false);
		
		aragaz = new Stove();
		aragaz.setX(150);
		aragaz.setY(200);
		aragaz.setStare(false);
		
		robinetBuc = new Tap();
		robinetBuc.setX(220);
		robinetBuc.setY(200);
		robinetBuc.setStare(false);
		
		masaScaune=new Table();
		masaScaune.setX(200);
		masaScaune.setY(50);
		masaScaune.setImage(new Image(HomeInterface.display, "pozeAparate/table.png"));
		
		//baie2
		masina = new WashingMachine();
		masina.setX(180);
		masina.setY(310);
		masina.setStare(false);
		
		robinetB2 = new Tap();
		robinetB2.setX(220);
		robinetB2.setY(430);
		robinetB2.setStare(false);
		
		wc2 = new WC();
		wc2.setX(80);
		wc2.setY(310);
		wc2.setStare(false);
		
		//baie1
		robinetBaie1 = new Tap();
		robinetBaie1.setX(530);
		robinetBaie1.setY(520);
		robinetBaie1.setStare(false);
		
		cadaBaie1 = new Bathtub();
		cadaBaie1.setX(420);
		cadaBaie1.setY(720);
		cadaBaie1.setImage(new Image(HomeInterface.display, "pozeAparate/cadaDeBaie.png"));
		
		wc1 = new WC();
		wc1.setX(410);
		wc1.setY(520);
		wc1.setStare(false);
		
		robinetVana=new Tap();
		robinetVana.setX(420);
		robinetVana.setY(670);
		robinetVana.setStare(false);
		
		//living
		tv = new TV();
		tv.setX(180);
		tv.setY(520);
		tv.setStare(false);
		
		calcL = new Computer();
		calcL.setX(20);
		calcL.setY(520);
		calcL.setStare(false);
		
		canap=new Sofa();
		canap.setX(250);
		canap.setY(700);
		canap.setImage(new Image(HomeInterface.display, "pozeAparate/sofa.png"));
		
		//d2
		aer = new AirConditioning();
		aer.setX(940);
		aer.setY(325);
		aer.setStare(false);
		
		patS1=new Bed();
		patS1.setX(650);
		patS1.setY(450);
		patS1.setImage(new Image(HomeInterface.display, "pozeAparate/singlebed.png"));
		
		//d3
		patS2=new Bed();
		patS2.setX(650);
		patS2.setY(250);
		patS2.setImage(new Image(HomeInterface.display, "pozeAparate/singlebed.png"));
		
		//d1
		patD=new DoubleBed();
		patD.setX(650);
		patD.setY(730);
		patD.setImage(new Image(HomeInterface.display, "pozeAparate/bed.png"));
		
		//hol
		plant=new Plant();
		plant.setX(600);
		plant.setY(50);
		plant.setImage(new Image(HomeInterface.display, "pozeAparate/planta.png"));
		
		
		//modelul casei
		living.addWall(new Wall(new Point(0,800), new Point (400,800)));
		living.addWall(new Wall(new Point(400,800), new Point (400,500)));
		living.addWall(new Wall(new Point(400,500), new Point (0,500)));
		living.addWall(new Wall(new Point(0,500), new Point (0,800)));
		living.addDoor(new Door(new Point(340,500), new Point (380,500)));
		living.addDoor(new Door(new Point(400,600), new Point (400,640)));
		living.addWindow(new Window(new Point(0,600), new Point (0,640)));
		living.addWindow(new Window(new Point(200,800), new Point (240,800)));
		
		baie1.addWall(new Wall(new Point(400,800), new Point (600,800)));
		baie1.addWall(new Wall(new Point(600,800), new Point (600,500)));
		baie1.addWall(new Wall(new Point(600,500), new Point (400,500)));
		baie1.addWall(new Wall(new Point(400,500), new Point (400,800)));
		baie1.addDoor(new Door(new Point(400,600), new Point (400,640)));
		baie1.addDoor(new Door(new Point(440,800), new Point (480,500)));
		baie1.addDoor(new Door(new Point(600,600), new Point (600,640)));
		baie1.addWindow(new Window(new Point(460,800), new Point (500,800)));
	
		dormitor1.addWall(new Wall(new Point(600,800), new Point (1000,800)));
		dormitor1.addWall(new Wall(new Point(1000,800), new Point (1000,500)));
		dormitor1.addWall(new Wall(new Point(1000,500), new Point (600,500)));
		dormitor1.addWall(new Wall(new Point(600,500), new Point (600,800)));
		dormitor1.addDoor(new Door(new Point(600,600), new Point (600,640)));
		dormitor1.addDoor(new Door(new Point(700,500), new Point (740,500)));
		dormitor1.addWindow(new Window(new Point(800,800), new Point (840,800)));
		
		dormitor2.addWall(new Wall(new Point(600,500), new Point (1000,500)));
		dormitor2.addWall(new Wall(new Point(1000,500), new Point (1000,300)));
		dormitor2.addWall(new Wall(new Point(1000,300), new Point (600,300)));
		dormitor2.addWall(new Wall(new Point(600,300), new Point (600,480)));
		dormitor2.addDoor(new Door(new Point(700,500), new Point (740,500)));
		dormitor2.addDoor(new Door(new Point(600,360), new Point (600,400)));
		dormitor2.addWindow(new Window(new Point(1000,400), new Point (1000,440)));
		
		dormitor3.addWall(new Wall(new Point(600,300), new Point (1000,300)));
		dormitor3.addWall(new Wall(new Point(1000,300), new Point (1000,0)));
		dormitor3.addWall(new Wall(new Point(1000,0), new Point (600,0)));
		dormitor3.addWall(new Wall(new Point(600,0), new Point (600,300)));
		dormitor3.addDoor(new Door(new Point(600,140), new Point (600,180)));
		dormitor3.addWindow(new Window(new Point(700,0), new Point (740,0)));
		
		baie2.addWall(new Wall(new Point(0,500), new Point (300,500)));
		baie2.addWall(new Wall(new Point(300,500), new Point (300,300)));
		baie2.addWall(new Wall(new Point(300,300), new Point (0,300)));
		baie2.addWall(new Wall(new Point(0,300), new Point (0,500)));
		baie2.addDoor(new Door(new Point(300,360), new Point (300,400)));
		baie2.addWindow(new Window(new Point(0,340), new Point (0,380)));
		
		bucatarie.addWall(new Wall(new Point(0,300), new Point (300,300)));
		bucatarie.addWall(new Wall(new Point(300,300), new Point (300,0)));
		bucatarie.addWall(new Wall(new Point(300,0), new Point (0,0)));
		bucatarie.addWall(new Wall(new Point(0,0), new Point (0,300)));
		bucatarie.addDoor(new Door(new Point(300,140), new Point (300,180)));
		bucatarie.addWindow(new Window(new Point(0,160), new Point (0,200)));
		
		hol.addWall(new Wall(new Point(300,500), new Point (600,500)));
		hol.addWall(new Wall(new Point(600,500), new Point (600,0)));
		hol.addWall(new Wall(new Point(600,0), new Point (300,0)));
		hol.addWall(new Wall(new Point(300,0), new Point (300,500)));
		hol.addDoor(new Door(new Point(300,140), new Point (300,180)));
		hol.addDoor(new Door(new Point(300,360), new Point (300,400)));
		hol.addDoor(new Door(new Point(400,0), new Point (440,0)));
		hol.addDoor(new Door(new Point(440,500), new Point (480,500)));
		hol.addDoor(new Door(new Point(340,500), new Point (380,500)));
		hol.addDoor(new Door(new Point(600,360), new Point (600,400)));
		hol.addDoor(new Door(new Point(600,140), new Point (600,180)));
		
		
		
	}
}
